package main;

import gui.ControlFrame;

import javax.swing.JFrame;

import retina.Ganglion;

public class Main 
{
	public static final int X_SIZE = 800;
	public static final int Y_SIZE = 600;
	
	
	public static void main(String[] args)
	{
		
		 JFrame frame = new JFrame();
		 
		 ControlFrame applet = new ControlFrame();
		 
		 frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		 frame.setResizable(false);
		 frame.getContentPane().add(applet);
		 frame.setSize(X_SIZE, Y_SIZE);
		 frame.setTitle("Super Retina Simul");
		 applet.init();
		 applet.start();
		 frame.setVisible(true);
		 
		
		Ganglion g = new Ganglion(3, 7.50);
		g.initialize(Ganglion.OFF_CENTER);
		
		g.crudePrint();
		
		double[][] inputArr = { {1,1,1}, {1,1,1}, {1,1,1} };
		
		for (int x=0; x < inputArr.length; x++)
		{
			for (int y=0 ; y < inputArr[x].length; y++)
			{
				inputArr[x][y] = g.firePhotoreceptor(inputArr[x][y], x, y);
			}
		}
		
		System.out.println("\nCumulative firing is: "+g.fire(inputArr));
	}

}
